Code:
char* file_buffer = new char[filesize + 1];
fread (file_buffer, filesize, 1, handle);
file_buffer[filesize] = '\0';
file_buffer = strchr(file_buffer, '\n') + 1;
file_buffer = strchr(file_buffer, '\n') + 1;
delete[] file_buffer;
Segmentation fault yet again...
I don't get the faults if I don't do two of the strchr's, but I need to get down two lines in this x_X
edit: Oddly enough, if I make the last strchr + 1 to strchr + 2, I don't get a segmentation fault...
I'm just going to rewrite the parser, prolly end up a lot smaller too x_X
Thanks for the help guys =).